#include <cstdlib>
#include <string>
#include <iostream>
#include <vector>
using namespace std;


class Solution {
public:
	string convertToTitle(int n) {
		int remain = 0;
		string s;
		while (n != 0){
			remain = n % 26;
			if (remain == 0){
				n -= 26;
				n /= 26;
				s = "Z" + s;
			}
			else{
				n -= remain;
				n /= 26;
				string temp = "A";
				temp[0] = 'A' + remain - 1;
				s = temp + s;
			}
		}
		return s;
	}
};


int main(int argc, char** argv){
	cout << Solution().convertToTitle(28) << endl;
	return 0;
}